Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make types strict to prevent accidental deletion via unused types, the optionality is a trap, they are required #16346

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

peter-sanderson
Copy link
Contributor

Fix of #16340

Followup of #16344

received?: string;
balance: string;
sent: string;
received: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By making it required we avoid the trap of unused values.

Those are used and required and IMO the only reason they were optional is some back compatibility or iterative composition of the type.

The "0" value can be used safely I think as we turn it to 0 anyway in the UI.

Copy link

github-actions bot commented Jan 14, 2025

🚀 Expo preview is ready!

  • Project → trezor-suite-preview
  • Platforms → android, ios
  • Scheme → trezorsuitelite
  • Runtime Version → 21
  • More info

Learn more about 𝝠 Expo Github Action

@peter-sanderson peter-sanderson self-assigned this Jan 14, 2025
@peter-sanderson peter-sanderson force-pushed the fix-stuff-zero-stuff2 branch 2 times, most recently from 4ad2055 to cd56b6f Compare January 14, 2025 14:26
…s, the optionality is a trap, they are required
@peter-sanderson peter-sanderson merged commit 184ebbb into develop Jan 14, 2025
76 checks passed
@peter-sanderson peter-sanderson deleted the fix-stuff-zero-stuff2 branch January 14, 2025 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🤝 Needs QA
Development

Successfully merging this pull request may close these issues.

2 participants